using Assets.Scripts.GDK;

namespace Brick
{
	public class StopPanel : gdk_base_panel
	{
		public override void OnLoad()
		{
		}

		public void OnLobbyClick()
		{
			gdk_game_manager.PlaySound(AudioID.click);
			string adType = GameManager.getAdType();
			GDK.ModuleManger.Module<AdvansBoxMoudle>().PlayAD(Advans.XPZTBACK, adType, delegate
			{				
				gdk_game_manager.blackScene();
				close();
			}, delegate
			{			
				gdk_game_manager.blackScene();
				close();
			});
			GDK.ModuleManger.Module<LevelInfoBoxModule>().sendPauseCustomEvent();
			
		}

		public void OnReStartClick()
		{
			gdk_game_manager.PlaySound(AudioID.click);
			string adType = GameManager.getAdType();		
			GDK.ModuleManger.Module<LevelInfoBoxModule>().sendPauseCustomEvent();
			GDK.ModuleManger.Module<LevelInfoBoxModule>().sendCustomEvent();
			gdk_game_manager.DispachEvent(EventID.HIDE_PLAY_DANGER);
			gdk_game_manager.showPanel(PanelID.YULAN);
			close();
		
		}

		public void OnCloseClick()
		{
			gdk_game_manager.PlaySound(AudioID.click);
			close();			
		}
	}
}

